home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pru_lagoon.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  61 lines

  1. # Jones 3D Cog Script
  2. #
  3. # PRU_lagoon.cog    Raft won't sink if Indy enters lagoon from Raiders.
  4. #
  5. # [GGJ]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10. symbols
  11. message    startup
  12. message    damaged
  13.  
  14. thing    raftPlayer
  15.  
  16. sector    lagoon0
  17. sector    lagoon1
  18. sector    lagoon2
  19. sector    lagoon3
  20.  
  21. sector    lagoon4
  22. sector    lagoon5
  23. sector    lagoon6
  24. sector    lagoon7
  25. sector    lagoon8
  26. sector    lagoon9
  27. sector    lagoon10
  28.  
  29. end
  30. # ========================================================================================
  31. code
  32. startup:
  33. Sleep(0.01);
  34. CaptureThing(raftPlayer);
  35. return;
  36.  
  37. damaged:
  38. #Checks for raft damage.
  39. #Could also check player to see if physics flags == 2,000,000 (rafting).
  40.  
  41. PRINT("DAMAGED");
  42. PRINTINT(GETPARAM(1));
  43. #if (skipper != 1) return;
  44. if (!BitTest(GetParam(1), 0x800000)) return;
  45.  
  46. if ((GetThingSector(raftPlayer) == lagoon0) || (GetThingSector(raftPlayer) == lagoon1) || 
  47.     (GetThingSector(raftPlayer) == lagoon2) || (GetThingSector(raftPlayer) == lagoon3) || 
  48.     (GetThingSector(raftPlayer) == lagoon4) || (GetThingSector(raftPlayer) == lagoon5) || 
  49.     (GetThingSector(raftPlayer) == lagoon6) || (GetThingSector(raftPlayer) == lagoon7) ||
  50.     (GetThingSector(raftPlayer) == lagoon8) || (GetThingSector(raftPlayer) == lagoon9) ||
  51.     (GetThingSector(raftPlayer) == lagoon10))
  52.  
  53. {
  54.     PRINT("RETURNING EX TO HEAL RAFT");
  55.     StopSoundClass(raftPlayer, 65); // hiss
  56.     ReturnEx(0);
  57. }
  58. return;
  59.  
  60. end
  61.